<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <div id="app">
        <div v-if='isShow'>
            显示
        </div>
        <div v-else>隐藏</div>
    </div>
    <script src="vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                isShow:Math.random()>0.5
            }
        })
    </script>
</body>
</html>